import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ball_lion/utils/utils.dart';
import 'package:ball_lion/module/pick/items/chart_bar_page.dart';
import 'package:ball_lion/module/pick/items/chart_line_page.dart';
import 'package:ball_lion/module/pick/items/chart_radar_page.dart';
import 'ai_type.dart';

class AiDetailPage extends StatelessWidget {
  const AiDetailPage({super.key});

  @override
  Widget build(BuildContext context) {
    AiType? type = Get.arguments is AiType
        ? Get.arguments
        : AiType.getTypeByTag(Get.arguments);
    switch (type) {
      case AiType.radar:
      case AiType.lm:
        return ChartRadarPage(
            type: Get.arguments, matchId: Get.parameters['id'].toInt() ?? 0);
      case AiType.trend:
      case AiType.pre:
        return ChartLinePage(
            type: Get.arguments, matchId: Get.parameters['id'].toInt() ?? 0);
      case AiType.faith:
      case AiType.assess:
        return ChartBarPage(
            type: Get.arguments, matchId: Get.parameters['id'].toInt() ?? 0);
      default:
        return Container();
    }
  }
}
